#include<stdio.h>
int main()
{
    int n;
    scanf("%d", &n);
    double m = 0;
    if(n > 400) m = 150*0.4463+250*0.4663+(n-400)*0.5663;
    else if(n > 150) m = 150*0.4463+(n-150)*0.4663;
    else m = n * 0.4463;
    printf("%.1f\n", m);
    return 0;
}